using System;
using UnityEngine;
using UnityEngine.Rendering;

[Serializable,VolumeComponentMenu("Hidden/Interface")]
public class CustomVolumeComponent : VolumeComponent
{
    #region 外部调用接口
    public virtual void UpdateInt(int i, int type = 0) { }

    public virtual void UpdateFloat(float f1, int type = 0) { }

    public virtual void UpdateVector2(float f1, float f2, int type = 0) { }

    public virtual void UpdateVector3(float f1, float f2, float f3, int type = 0) { }

    public virtual void UpdateVector4(float f1, float f2, float f3, float f4, int type = 0) { }

    public virtual void UpdateVector5(float f1, float f2, float f3, float f4, float f5, int type = 0) { }

    public virtual void UpdateVector6(float f1, float f2, float f3, float f4, float f5, float f6, int type = 0) { }

    public virtual void UpdateVector7(float f1, float f2, float f3, float f4, float f5, float f6, float f7, int type = 0) { }

    public virtual void UpdateVector8(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, int type = 0) { }

    public virtual void UpdateVector9(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, int type = 0) { }

    public virtual void UpdateVector12(float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, int type = 0) { }

    public virtual void SetMainTexture(Texture tex) { }
    public virtual void SetMaskTexture(Texture tex1) { }

    public virtual void SetActive(bool value) { }

    public virtual void SetUpdateFollow(int entityId, string boneName) { }

    #endregion

    public BuiltinRenderTextureType BlitDstDiscardContend(CommandBuffer cmd, RenderTargetIdentifier rt) {
        //只保留color，把depth丢掉，节约带宽
        cmd.SetRenderTarget(new RenderTargetIdentifier(rt, 0, CubemapFace.Unknown, -1), RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.DontCare);
        return BuiltinRenderTextureType.CurrentActive;
    }
}
